//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Linq;
using $prjsn$.Common.Business.Services;
using $prjsn$.Entity.Services;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ProjectBase.Core;
using ProjectBase.Core.Service;

using $prjsn$.Common;

namespace $safeprojectname$.MetaData
{
    [TestClass]
    public class UserMDTest : EntityTestBase<IUserFacade>
    {
        [TestMethod]
        public void User_MetaData_Contains_String_Properties()
        {
            var metaDataProvider = Factory.CreateInstance<IMetaDataProvider<User, int>>();
            var metaData = metaDataProvider.GetMetaData();

            Assert.IsTrue(metaData.Is());
            Assert.IsTrue(metaData.Attributes.IsNotEmpty());

            var login = metaData.Attributes.SingleOrDefault(md => md.Name.IsEqual("Login"));
            Assert.IsTrue(login.Is());
            Assert.IsTrue(login.DataType.IsEqual(typeof(string).Name));

            var firstName = metaData.Attributes.SingleOrDefault(md => md.Name.IsEqual("FirstName"));
            Assert.IsTrue(firstName.Is());
            Assert.IsTrue(firstName.DataType.IsEqual(typeof(string).Name));
        }

        #region Additional test attributes

        // constructor
        public UserMDTest()
        {
        }

        [ClassInitialize]
        public static void MyClassInitialize(TestContext testContext) { }

        [ClassCleanup]
        public static void MyClassCleanup() { }

        [TestInitialize]
        public override void MyTestInitialize() { base.MyTestInitialize(); }

        [TestCleanup]
        public override void MyTestCleanup() { base.MyTestCleanup(); }

        #endregion Additional test attributes
    }
}